public Test ToBusinessModal(EntityDataModel.Test entity, BusinessDataModel.Test businessModel) { businessModel.Id = entity.Id; businessModel.Name = entity.Name; businessModel.Address = entity.Address; return(businessModel); }
public Test Save(Test businessModel) { EntityDataModel.Test entity = new EntityDataModel.Test { Name = businessModel.Name, Address = businessModel.Address }; Context.Tests.Add(entity); Context.SaveChanges(); ToBusinessModal(entity, businessModel); return(businessModel); }