public DataModel.planes CreateEntity(PlanBE be) { DataModel.planes entity = new DataModel.planes() { id_plan = be.id_plan, id_especialidad = be.id_especialidad, desc_plan = be.desc_plan, estado = be.estado }; return(entity); }
public PlanBE CreateBusiness(DataModel.planes entity) { PlanBE be = new PlanBE() { id_plan = entity.id_plan, id_especialidad = entity.id_especialidad, desc_plan = entity.desc_plan, estado = entity.estado }; return(be); }
public long Create(PlanBE Be) { try { if (Be != null) { DataModel.planes entity = Factory.FactoryPlan.GetInstance().CreateEntity(Be); _puente.Planrepository.Insert(entity); _puente.Commit(); return(entity.id_plan); } else { throw new ApiBusinessException(1012, "No se pudo crear el plan", System.Net.HttpStatusCode.NotFound, "Http"); } } catch (Exception ex) { throw HandlerErrorExceptions.GetInstance().RunCustomExceptions(ex); } }