public static void AddComunity(ComunityDTO com) { using (DAL.MoveilEntities db = new DAL.MoveilEntities()) { db.Comunities.Add(CONVERTERES.ComunityConverters.ConvertComunitytoDal(com)); db.SaveChanges(); } }
public static Comunity ConvertComunitytoDal(ComunityDTO com) { return(new Comunity { ComunityCode = com.ComunityCode, ComunityName = com.ComunityName, CityCode = com.CityCode, SectorCode = com.SectorCode, CostoCode = com.CostoCode, anciano = com.anciano, About = com.About, RepresentanteCode = com.RepresentanteCode }); }
public IHttpActionResult AddComunity(ComunityDTO com) { BL.ComunityBL.AddComunity(com); return(Ok(true)); }