Beispiel #1
0
 public bool Delete(MemberEntity entity)
 {
     try
     {
         _memberRepository.Delete(entity);
         return true;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return false;
     }
 }
Beispiel #2
0
 public MemberEntity Create(MemberEntity entity)
 {
     try
     {
         _memberRepository.Insert(entity);
         return entity;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return null;
     }
 }
Beispiel #3
0
        public bool Post(MemberModel model)
        {
            var entity = new MemberEntity
            {

                User = model.User,

                OpenId = model.OpenId,

            //				Orders = model.Orders,

                ContactName = model.ContactName,

            };
            if(_MemberService.Create(entity).Id > 0)
            {
                return true;
            }
            return false;
        }