将对象(图像)转换为三层(3 层)中的另一个对象(字节) [英] convert of the object (image) to another object (Byte) in three layers(3-tier)

查看:14
本文介绍了将对象(图像)转换为三层(3 层)中的另一个对象(字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

转换可以在第一层 (UI) 中完成吗?

Conversions can be done in the first layer ( UI ) ?

推荐答案

对于这类操作我个人在项目namespace下创建了一个Utils class/namespace (myProjectNamespace.Utils).一个 ststic 类,带有 public static 成员,用于转换、格式化、计算......

For these kind of operations I personally create a Utils class/namespace under project namespace (myProjectNamespace.Utils). A ststic class with public static members for conversions, formatting, calculations...

大多数时候把这个类放在BLL(业务逻辑层)中,但有时你需要为不同的层使用不同的Utils.

Put this class in BLL (Business Logic Layer) most of the time but sometimes you need different Utils for different layers.

这篇关于将对象(图像)转换为三层(3 层)中的另一个对象(字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆