public bool Delete(int id) { var userp = new USERP { Id = id }; return(_uSERService.Delete(userp)); }
public bool Add(string name, string gender) { var userp = new USERP { Name = name, Gender = gender }; return(_uSERService.Add(userp)); }
public int Delete(USERP entity) { var sqlCommand = string.Format(@"DELETE FROM [USER] WHERE [Id] = @Id"); return(this._db.Execute(sqlCommand, new { entity.Id })); }
public int Add(USERP entity) { var sqlCommand = string.Format(@"INSERT INTO [USER] ([Name],[Gender]) VALUES (@Name, @Gender)"); return(this._db.Execute(sqlCommand, new { entity.Name, entity.Gender })); }
public int Update(USERP entity) { var sqlCommand = string.Format(@"UPDATE [USER] SET [Name] = @Name ,[Gender] = @Gender WHERE [Id] = @Id"); return(this._db.Execute(sqlCommand, new { entity.Name, entity.Gender, entity.Id })); }
public bool Delete(USERP uSERP) { var userps = _userProductRepository.FindByUsertId(uSERP.Id); if (userps.Any()) { foreach (var userp in userps) { var _use = new UserProduct { Id = userp.Id }; _userProductRepository.Delete(_use); } } return(_uSERRepository.Delete(uSERP) > 0); }
public bool Update(USERP uSERP) { return(_uSERRepository.Update(uSERP) > 0); }
public bool Add(USERP uSERP) { return(_uSERRepository.Add(uSERP) > 0); }
public bool Update(USERP userp) { return(_uSERService.Update(userp)); }