public async Task <ObjectResult <Member> > Add(Member model) { if (await _dal.Any(x => x.Username == model.Username)) { return(new ObjectResult <Member>(Errors.Custom("Username Already exists"))); } model.CreateDate = DateTime.Now; model.Password = Functions.MD5(model.Password); model.Id = Guid.NewGuid().ToString(); return(new ObjectResult <Member>(Success.success, _dal.Create(model.Id, model))); }