public bool SaveBranch(BranchDto branchDetails) { this.branch = branchDetails.DtoToEntity(); if (this._branch.Insert(this.branch).IsNull()) { return(false); } return(true); }
public static IOBalanceEntity.Branch DtoToEntity(this BranchDto dto) { IOBalanceEntity.Branch entity = null; if (!dto.IsNull()) { entity = new IOBalanceEntity.Branch { BranchName = dto.BranchName.ToUpper(), BranchAddress = dto.BranchAddress, BranchDetails = dto.BranchDetails, CreatedBy = dto.CreatedBy, UpdatedBy = dto.UpdatedBy, CreatedDate = dto.CreatedDate, DateUpdated = dto.DateUpdated, BranchID = 0 }; } return(entity); }
public BranchService(IIOBalanceRepository <Branch> branch) { this._branch = branch; this.branch = new IOBalanceEntity.Branch(); }