internal Response addLabBranch(LabBranchDB labBranch) { Response response = Response.Success; try { LabBranch labBranchDb = new LabBranch(); labBranchDb.email = labBranch.email; labBranchDb.password = labBranch.password; labBranchDb.govern = labBranch.govern; labBranchDb.image = labBranch.image; labBranchDb.phone = labBranch.phone; labBranchDb.isAvailableFromHome = labBranch.isAvailableFromHome; labBranchDb.timeFrom = labBranch.timeFrom; labBranchDb.timeTo = labBranch.timeTo; labBranchDb.holidays = labBranch.holidays; labBranchDb.longitude = labBranch.longitude; labBranchDb.latitude = labBranch.latitude; labBranchDb.FireBaseId = labBranch.FireBaseId; labBranchDb.LabId = labBranch.LabId; labBranchDb.rating = labBranch.rating; labBranchDb.reviewId = labBranch.reviewId; labBranchDb.governId = labBranch.governId; labBranchDb.Address = labBranch.address; checkUpContext.LabBranches.Add(labBranchDb); checkUpContext.SaveChanges(); } catch (Exception ex) { response = Response.Fail; } return(response); }
public Response addLabBranch([FromBody] LabBranchDB labBranch) { return(analysisManager.addLabBranch(labBranch)); }