BllResultFactory.cs
740 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HHWCS.Bll
{
public class BllResultFactory
{
public static BllResult<T> Sucess<T>(T data,String msg)
{
return new BllResult<T>(true, msg, data);
}
public static BllResult<T> Error<T>(T data, String msg)
{
return new BllResult<T>(false, msg, data);
}
public static BllResult Sucess(Object data, String msg)
{
return new BllResult(true, msg, data);
}
public static BllResult Error(object data, String msg)
{
return new BllResult(false, msg, data);
}
}
}