public ActionResult AddDrugInRoom([FromBody] String JSONString) { Console.WriteLine("usao u kontroler"); String JSONContent = StringToJSONFormat(JSONString); DrugInRoom drugInRoom = JsonConvert.DeserializeObject <DrugInRoom>(JSONContent); _drugInRoomService.AddDrugInRoom(drugInRoom); return(Ok()); }
public DrugInRoom(DrugInRoom drugInRoom) { this.DrugId = drugInRoom.DrugId; this.Quantity = drugInRoom.Quantity; this.RoomNumber = drugInRoom.RoomNumber; }
public DrugInRoom SetDrug(DrugInRoom drugInRoom) { throw new NotImplementedException(); }
public DrugInRoom AddDrug(DrugInRoom drugInRoom) { _context.DrugsInRooms.Add(drugInRoom); _context.SaveChanges(); return(drugInRoom); }
public DrugInRoom EditDrugInRoom(DrugInRoom drugInRoom) { return(_drugInRoomRepository.SetDrug(drugInRoom)); }
public DrugInRoom AddDrugInRoom(DrugInRoom drugInRoom) { Console.WriteLine("usao u servis"); return(_drugInRoomRepository.AddDrug(drugInRoom)); }