public async Task <int> SaveTag([FromBody] LookupTag obj) { try { return(await this._lookupTag.SaveTag(obj)); } catch (Exception ex) { Logger.LogError($"Something went wrong inside TagController SaveTag action: {ex.Message}"); return(-1); } }
public async Task <List <LookupTag> > GetAllTag([FromBody] LookupTag obj) { try { return(await this._lookupTag.GetAllTag(obj)); } catch (Exception ex) { Logger.LogError($"Something went wrong inside TagController GetAllTag action: {ex.Message}"); return(null); } }
public async Task <List <LookupTag> > GetAllTag(LookupTag obj) { try { DynamicParameters parameters = new DynamicParameters(); List <LookupTag> lst = (await SqlMapper.QueryAsync <LookupTag>(con, "p_Tag_sel", param: parameters, commandType: StoredProcedure)).ToList(); return(lst); } catch (Exception ex) { throw (ex); } }
public async Task <int> SaveTag(LookupTag obj) { try { DynamicParameters parameters = new DynamicParameters(); parameters.Add("@TagId", obj.TagId); parameters.Add("@TagName", obj.TagName); parameters.Add("@Description", obj.Description); parameters.Add("@Active", obj.Active); parameters.Add("@UserId", obj.CreatedBy); var res = await SqlMapper.ExecuteAsync(con, "p_Tag_ins", param : parameters, commandType : StoredProcedure); return(res); } catch (Exception ex) { throw (ex); } }
public Task <int> SaveTag(LookupTag obj) { return(_lookupTag.SaveTag(obj)); }
public Task <List <LookupTag> > GetAllTag(LookupTag obj) { return(_lookupTag.GetAllTag(obj)); }