public bool SaveDetails(CategoryDto newDetails) { this.category = newDetails.DtoToEntity(); if (this._category.Insert(this.category).IsNull()) { return(false); } return(true); }
public static IOBalanceDBV2Entity.Category DtoToEntity(this CategoryDto dto) { IOBalanceDBV2Entity.Category entity = null; if (!dto.IsNull()) { entity = new IOBalanceDBV2Entity.Category { CategoryID = dto.CategoryId, CategoryName = dto.CategoryName }; } return(entity); }
public CategoryService(IIOBalanceV2Repository <Category> category) { this._category = category; this.category = new IOBalanceDBV2Entity.Category(); }