public AreaUpdateHandler(GlobalSolusindoDb db, tblM_User user, AreaValidator areaValidator, AreaFactory areaFactory, AreaQuery areaQuery, AccessControl accessControl) : base(db, user) { this.areaValidator = areaValidator; this.areaFactory = areaFactory; this.areaQuery = areaQuery; this.areaEntryDataProvider = new AreaEntryDataProvider(db, user, accessControl, areaQuery); }
public IHttpActionResult GetForm(int id) { if (id > 0) { ThrowIfUserHasNoRole(readRole); } using (AreaEntryDataProvider areaEntryDataProvider = new AreaEntryDataProvider(Db, ActiveUser, AccessControl, new AreaQuery(Db))) { var data = areaEntryDataProvider.Get(id); SaveLog("Area", "GetForm", JsonConvert.SerializeObject(new { primaryKey = id })); return(Ok(new SuccessResponse(data))); } }