Esempio n. 1
0
        public static IQueryable <Account> GetAccounts(this HSBorsDb db, SearchAccountRequest request)
        {
            EntityStatus?status = null;

            if (!string.IsNullOrWhiteSpace(request.status))
            {
                status = EnumConvert.StringToEnum <EntityStatus>(request.status);
            }
            return(GetAccounts(db, request.id, request.fund_id, status));
        }
Esempio n. 2
0
        public static Setting ToEntity(this AddSettingRequest request, bool add_id = false)
        {
            var entity =
                new Setting
            {
                create_date = DateTime.Now,
                creator_id  = 1,
                type        = EnumConvert.StringToEnum <SettingType>(request.type),
                key         = request.key,
                value       = request.value,
                status      = EntityStatus.active
            };

            if (add_id)
            {
                entity.id = request.id;
            }
            return(entity);
        }